Authentication/auth Module ๐
The authentication(auth) module provides a whole user authentication flow with a mock api.
๐ Simply change baseUrl & api end-points and user authentication is ready.
Implemented features :โ
- Request & Response Models : Predefined authentication models for seamless API integration.
- User Model (Hive Storage) โ Store & manage user data locally with Hive.
- Auth Repository โ Well-structured login, sign-up, and logout flows.
- Secure Routing (Auth Guard) โ Restrict access for unauthenticated users.
- Change Password Support โ Enable users to update credentials securely.
- Delete Account API โ Handle account removal requests effortlessly.
- Hive Services โ CRUD operations for user data in local storage.
Social Signing (Sign in with Google and Apple)โ
๐ Google Sign-In Auth Helper : GoogleAuthHelperโ
- Complete wrapper around Google Sign-In + FirebaseAuth for a clean and plug-and-play experience.
- Handles sign-in, sign-out, and current user fetch.
- Built-in callbacks for success and error handling.
- Auto-creates AuthRequestModel with playerId support.
๐ Apple Sign-In Auth Helper : AppleAuthHelperโ
- Uses sign_in_with_apple for native integration.
- Returns ready-to-use AuthRequestModel.
- Optional callback for success/error flows.
- playerId placeholder for OneSignal sync.
- Built with platform scopes: email & fullName.
warning
As we all know, in Sign in with Apple, when a user chooses to hide their email, Apple automatically redirects emails to their original email address.
However, to enable this functionality, some setup is required. You can follow this guide.